.\" 
.\" groff -man -Tascii name_of_file
.\"
.TH libm3l 1 "June 2012" libm3l "User Manuals"
.SH NAME
m3l_Ln \- copy list(s)
.SH SYNOPSIS

#include <libm3l.h>

.B size_t m3l_Ln
(node_t **SList, const char *s_path, const char *s_path_loc, node_t **TList, const char *t_path, const char *t_p
ath_loc, char * Options, ...)


.SH DESCRIPTION
.B m3l_Ln
links list(s) from a list tree 
.B SList 
to a target list list tree
.B TList
Path and location of list to be linked is specified by
.B s_path
and 
.B s_path_loc
.
Path and location of the new location of the list in Tlist list tree is specifed by
.B t_path
and 
.B t_path_loc
.

.SH OPTIONS
.IP "-a --add"
If Tlist already exists, do not rewrite it, add Slist as a new item
.IP "-c --clean_empty_refs_to_links"
Frees rather the linkedlist structure in list. When the list is linked, the 
.B linkedlist
structure contains the node info of the list where the list is linked to. When the link is removed
the corresponding item in linkedlist is set to NULL. This option frees the linkedlist NULL items
Called as a separate function when invoked as
.B  m3l_Ln(NULL, NULL, NULL, &List, NULL, NULL, "--clean_empty_refs_to_links", (char *)NULL));	
.IP "-e --clean_empty_links"
When source of the link is removed, the link is set to NULL 
This option loopes over links and cleans NULL links. Called as a separate function when invoked as
.B m3l_Ln(NULL, NULL, NULL, &List, NULL, NULL, "--clean_empty_links", (char *)NULL));	
.IP "-d --DIR"
Look for DIRs only
.IP "-f --FILE"
Look for FILEs only
.IP "-i --ignore"
ignore case
.IP "-I --IGNORE"
select all but specified files
.IP "-l --LINK"
Look for LINKs only

.SH RETURN VALUE
Upon successful completion m3l_Ln will return size_t value larger then 0. If return value  is 0, no lists were moved. Otherwise, it shall return a negative value.

.SH ERRORS
The m3l_Ln function fails if malloc/realloc fails

.SH CHANGE HISTORY
none

.SH AUTHOR
Adam Jirasek <libm3l at google dot com>
.SH "SEE ALSO"
.BR m3l_ln_list 
